//# 英制单位英寸与公制单位厘米互换,1英寸等于2.54厘米
#include <stdio.h>
#include <string.h>
int main(){
    float value;
    char unit;
    int ret1,ret2;
    printf("请输入长度:");
    scanf("%f",&value);
    printf("请输入单位:");
    scanf("%s",&unit);
    ret1=strcmp(unit,"in");
    ret2=strcmp(unit,"cm");
    if(ret1==0){
        printf("%f cm",value*2.54);
    }
    else if(ret2==0){
        printf("%f in",value/2.54);
    }
    else
        printf("error");
    return 0;
}